fixes and tests for events