fixed a bug in the test case for next/prev pages