this should  fix reopening of diagrams