Fixed some bugs with rref