Ya the movement code doesn't really like walls that much because if it tries to go off the map it just does nothing instead of moving a different direction, which just gets worse when there is 2 directions it cant move in instead of 1.