Fix phase retrieval kernel