bug fixes in events module