fixed pagination

Signed-off-by: Richard Bagshaw <richard@bagshaw.co.uk>