Fixed bug in < 1M bytes, as well as duplicate record bug.