fixed a bug with dragging stages