Fixed items-not-sorted-after-scanning bug.