fix event problems