Fixed a bug where phases would be 180 degrees off