Fixed some rotate_walls bugs