fix bug in remote command