Fixed a lockup bug when audio is enabled.