Fixed error report trying to partition on an empty range