Fixed a bug in last commit that caused half the pages to be missing

Change-Id: I7144280ae9fdb9bedafcdc9b89e3761a19ae7539