Fix escaping in extract