some housekeeping for robustness
Merging the audiocode