Fixed some edge cases in audio backend.