Bug fixes for the audio system

Bug fixes for the audio system