Fix of  Arno's NPE fix in glm.