fixed issue with deg. calculation