Fix bug in move method