Next page fix and tests