Fixed bug on keyword detection