Fixed bug with setting TCP port