fixed typo in Phi optimization