some remote code bugs fixed