bugfix for port setting