Fixed GLM bug