Fixed the bugs for the sound sensor