fix variable expression in here-document