Fixed a bug in the subMatrix function causing an index error