Some clean up. bug fixes on events logger