fixed issue with M_PI