Fix the matrices