fixing CPU consuming task by switching off event listener