Modifed gldiagnosis to improve layout