Fix animateControlToPosition function so that it still works with momentary controls