Fix some matrix class methods