$replace needs to be quoted, otherwise some bad things could happen