Some fixes while improved matrix-test.js' quality

Mutation analysis was performed on matrix-test.js with Mutator (http://ortask.com/mutator/). These are some fixes that were made for small issues in the source file while applying the analysis.