fix custom range bug.