How do I disable parts snapping to left and right locator positions?

I upgraded to Cubase 10 and when I record a short midi part, it extends to the left and right locator positions. I only want the midi part to be length of my actual recording. Where do I change the settings for this?

Thanks!

Hi,

Preferences > Record > MIDI > Snap MIDI Parts to Bars.

Thanks Martin. Your suggestion snaps midi parts to bars, not between left and right locator. But I found out the solution by accident. When I deactivated the Cycle recording mode, it solved the problem.