Fixed a bug that caused problems when using harmonic square wave as sweep shape