fix JS event handler removal