Fix variable expansion