Correcting bugs of the method isMovingPossible()