Fixed closing events.