bug fixed in rshell function