fix crash issue on close, due to closing the port twice