Fix escaping string at wrong point