Improve extend method

Improve extend method for some cases in FF/IE for event extending.