fixed bug that happened when 270 was entered