event api tests and bugfixes
event api tests and bugfixes