change page detection to allow leading zeros