sorted out the weird port use bug