Fixed various bugs associated with audio resource