1. Fix the bugs for MatrixMul functions which may cause nan in some cases. (IMPORTANT) 2. Fix the minor errors.