The angle comparison code was considering 90+359 degrees to be greater than 90 degree...