Updated phase measurement to work correctly