fixed mistype 'detach' -> 'detachEvent'