bugfix port detect