Fixed diagram formatting