Fixed the y=0 crossing bug.