fixed subshell issue