Correct logic to prevent page size of 0.