Fix issue with some angles greater than 180 or less than -180