fixed bugs in sound manager and preference manager