Fixed a_k/b_k -> A_k/Phi_k conversion to work for all values of a_k/b_k. Previously it only worked for certain values, which happened to include all of the ones I tested.