Fix for speech recognition toggle function