fix the diagram