Fix page count issue