Fixed a couple of event related issues.

These issues showed up in compilation after a fix was make in esdl.
Merge pull request #2 from puneet/master

Fixed a couple of event related issues.