Fix escaping for empty strings