fix extract_wave