remove duplicated handler on close