fixed a bug about hard-coded port