clear variable when events.count = 0
correcting version
Merge pull request #138 from vader722/master

clear variable when events.count = 0