Fix math error with display matrix in register.