fixed bug in change_phase