Trimming down fbx animation, why is unity adding extra frames?

When I export an animation from 3ds max as FBX, the End Time frame is 17, so it’s only 17 frames long and loops fine in max. I also baked it with that time set.
But when I import the animation into unity, it has 50 more frames and takes a while to loop. Why is unity adding random frames to my animation?
I even lowered the animation compression errors to 0.01 and that didn’t help.
In the animation window the animation is clearly wayy longer than it is in max. It plays, then the character stops and the extra frames are just blank nothingness for about 50 frames.

How can I trim it down? It’s definitely only 17 frames in max. I would really appreciate it if someone can help!

I had a similar problem with blender.
exporting in fbx, the animation lenght is not set by the last frame you set in the animation loop, but instead

by the last frame which has a keyframe in it

Do check that there’s no keyframe (absolutely none at all) in the 67th frame in your 3ds file. Since there probably is a keyframe, fbx export will disregard your ‘last animation frame’ token in the animation, and instead just export all frames between the first and the last.