corrected small bugs in web speech api code