fix ed_phs == 0 error