Improve checking of the angle condition