fixed bug with |phi|