       else if DoubleHelper.compare(target.getY(), @currentPosition.getY())
         # Same horizontal alignment
         horizontalMove()
-      else if Math.abs(target.getX() - @currentPosition.getX()) < neighborhoodLimit
+      else if Math.abs(target.getX() - @currentPosition.getX()) < neighborhoodWidthLimit
         verticalMove()
-      else if Math.abs(target.getY() - @currentPosition.getY()) < neighborhoodLimit
+      else if Math.abs(target.getY() - @currentPosition.getY()) < neighborhoodHeightLimit
         horizontalMove()
       else
         shouldMoveHorizontal = Math.round(Math.random()) is 0

      nextPosition = null
      orientation = null

      statement = Math.abs(target.getX() - @currentPosition.getX()) < neighborhoodLimit
      statement &= DoubleHelper.compare(target.getY(), @currentPosition.getY())
      if statement
        nextPosition = target


    callback = () => @_moveTo(target)

    neighborhoodWidthLimit = @grid.getBlockWidth() - @grid.getStreetSize() / 2
    neighborhoodHeightLimit = @grid.getBlockHeight() - @grid.getStreetSize() / 2

    verticalMove = () =>
      nextPosition = null
      orientation = null

      statement = Math.abs(target.getY() - @currentPosition.getY()) < neighborhoodHeightLimit
      statement &= DoubleHelper.compare(target.getX(), @currentPosition.getX())
      if statement
        nextPosition = target
