Fixing issues with waveform selection and output switching.