Fixed major bug with to do with assiging wrong sized matrix.