fixed the model matrix issue