Fixes some bugs in row echelon code.