fix some bugs: hmatrix doesn't like empty matrices
whitespace lol