fixed bug leading to double freeing the audiomanager instance