Fix errors with inserting into the wave_summary table