Some fix to remote.py

Signed-off-by: Yu Mingfei <yumingfei@cn.fujitsu.com>