bugfix for ssh wrapper function