fix_phase fixes ends