Small correction for writing PH files