Fix gsub issue causing malformed order ids