fix some remote bugs