Fixed potential crash in handleAudioPackets