minor fix in deg calculation