Fix a warning and indentation
Update also test to generate more events