Fixed backwards compatibility for dealing with event listeners