fix bug in glmmodel