Small bugfix in the move function