Work when wave_limit isn't specified, and fix warnings from new compiler.