Corrected small typos in the code

Changed the list element name for getmatrixinv and also changed the
setmatrixinv function definition