bug fix for getAngle()