fixing up the diagram editor