fix tab issues with diagrams