Fix small bug where page ranges are incorrectly read