Corrected calc_phi_s()