fix rendering of diagrams