patch to fix requesting a range of ids