fix to variable expansion