Added setPort()
Use setPort() instead of setting port manually