fixing typo with updateMatrices