Fix problem in diagrams