fix clear method in event.js