Fix flush event fired after empty event
Update coverage
Update documentation
Bump version 5.0.1