Make the event listener more compatible

Stupid IE...