set the host and some bug fixed