Did some testing. One bug seems to be related to omega (persistent phase shift). Somehow this eliminates the calculated phase shift...