Fix for plotting phase shifts