Unsubscribe from events when closed