Snapping to external rail