Fixed error in globalphase