fix multiple %01 wildcards

multiple off-by-ones, wrong syntax and stale constants on two lines