fixing issue where audiobuffer was being destroyed on end