Fixed the square wave problem in ECclass.