Fixed some bugs with the wave changing