fix EventBuffer
add events test for EventBuffer's testing
fix read counter in EventBuffer
improve events test