Fix getting pagenumber from request