Proper event closing