Improve event handling for IE