fix event listeners