fix escapes in heredoc