fixed bugs with waves update