Corrected event object handling

This is an improved fix for issue #81