fix some bug and modify port