fix event delegation