fixed subshell bug