Fixed bug where certain nested commands (such as "$(echo hi)") would fail.