Bash substitution fix