Fix motion event handling for move event