Improve accessor for matrix