fixed error in Phi handling