In some cases it was possible for the computed phase shift to skip a cycle. Update the shift calculation logic to prevent this.
In some cases it was possible for the computed phase shift to skip a cycle. Update the shift calculation logic to prevent this.