Improved mute function