fixed a bug in events library that couple prevent events from being added to an object