Made saving the matrices work again