Fix page number showing up as NaN