Corrected event on attachEvent