Fixed a bug in calculating costheta