Fix the diagram API.