Fix not debugged errors.

Change nr_pages to uint32_t.