Fix mismatching page count error