Remove bashism and fix bug in "mute".