Fixed a bug causing small matrices with non-unit det.