[NIDOM] Fix retain cycles