fixed bug in wave table generator