fix move logic