fix bug so only turns around when surrounded by walls