Fix some shell variable expansion