fixed id ordering pagination bug