CMBM: Fixed some issues with starting and shutting down tcp server