Bugfix: taking port value from correct variable