Port unregistering bug solved.