fix event handlig