Fixed some bugs in message passing code
Work-arounds for non-main-thread AVAudioSession notifications