Index: trunk/BNC/src/bnccore.cpp
===================================================================
--- trunk/BNC/src/bnccore.cpp	(revision 9807)
+++ trunk/BNC/src/bnccore.cpp	(revision 9819)
@@ -186,9 +186,9 @@
     QByteArray msgLocal = msg;
     if (msg.indexOf('\n') == 0) {
-      *_logStream << endl;
+      *_logStream << "\r\n";
       msgLocal = msg.mid(1);
     }
     *_logStream << currentDateAndTimeGPS().toString("yy-MM-dd hh:mm:ss ").toLatin1().data();
-    *_logStream << msgLocal.data() << endl;
+    *_logStream << msgLocal.data() << "\r\n";
     _logStream->flush();
     _logFile->flush();
Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 9807)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 9819)
@@ -211,18 +211,9 @@
   _rtnetDecoder = 0;
 
-  connect(this,     SIGNAL(newMessage(QByteArray,bool)),
-          BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
-
-  connect(BNC_CORE, SIGNAL(providerIDChanged(QString)),
-          this,     SLOT(slotProviderIDChanged(QString)));
-
-  connect(BNC_CORE, SIGNAL(newOrbCorrections(QList<t_orbCorr>)),
-          this,     SLOT(slotNewOrbCorrections(QList<t_orbCorr>)));
-
-  connect(BNC_CORE, SIGNAL(newClkCorrections(QList<t_clkCorr>)),
-          this,     SLOT(slotNewClkCorrections(QList<t_clkCorr>)));
-
-  connect(BNC_CORE, SIGNAL(newCodeBiases(QList<t_satCodeBias>)),
-          this,     SLOT(slotNewCodeBiases(QList<t_satCodeBias>)));
+  connect(this, SIGNAL(newMessage(QByteArray,bool)), BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
+  connect(BNC_CORE, SIGNAL(providerIDChanged(QString)), this, SLOT(slotProviderIDChanged(QString)));
+  connect(BNC_CORE, SIGNAL(newOrbCorrections(QList<t_orbCorr>)), this, SLOT(slotNewOrbCorrections(QList<t_orbCorr>)));
+  connect(BNC_CORE, SIGNAL(newClkCorrections(QList<t_clkCorr>)), this, SLOT(slotNewClkCorrections(QList<t_clkCorr>)));
+  connect(BNC_CORE, SIGNAL(newCodeBiases(QList<t_satCodeBias>)), this, SLOT(slotNewCodeBiases(QList<t_satCodeBias>)));
 
   // Combination Method
@@ -561,15 +552,7 @@
     // Check satellite code biases
     // ----------------------------
-    if (!_satCodeBiases.contains(acName)) {
-      delete newCorr;
-      continue;
-    }
-    else {
+    if (_satCodeBiases.contains(acName)) {
       QMap<t_prn, t_satCodeBias>& storage = _satCodeBiases[acName];
-      if (!storage.contains(clkCorr._prn)) {
-        delete newCorr;
-        continue;
-      }
-      else {
+      if (storage.contains(clkCorr._prn)) {
         newCorr->_satCodeBias = storage[clkCorr._prn];
         QMap<t_frequency::type, double> codeBiasesRefSig;
@@ -586,15 +569,13 @@
           }
         }
-        if (codeBiasesRefSig.size() < 2) {
-          delete newCorr;
-          continue;
-        }
-        map<t_frequency::type, double> codeCoeff;
-        double channel = double(newCorr->_eph->slotNum());
-        cmbRefSig::coeff(sys, cmbRefSig::cIF, channel, codeCoeff);
-        map<t_frequency::type, double>::const_iterator it;
-        for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {
-          t_frequency::type frqType = it->first;
-          newCorr->_codeBiasIF += it->second * codeBiasesRefSig[frqType];
+        if (codeBiasesRefSig.size() == 2) {
+          map<t_frequency::type, double> codeCoeff;
+          double channel = double(newCorr->_eph->slotNum());
+          cmbRefSig::coeff(sys, cmbRefSig::cIF, channel, codeCoeff);
+          map<t_frequency::type, double>::const_iterator it;
+          for (it = codeCoeff.begin(); it != codeCoeff.end(); it++) {
+            t_frequency::type frqType = it->first;
+            newCorr->_satCodeBiasIF += it->second * codeBiasesRefSig[frqType];
+          }
         }
         newCorr->_satCodeBias._bias.clear();
@@ -1050,5 +1031,6 @@
     }
 
-    ll(iObs) = (corr->_clkCorr._dClk * t_CST::c - corr->_codeBiasIF) - DotProduct(AA.Row(iObs), x0);
+    ll(iObs) = (corr->_clkCorr._dClk * t_CST::c - corr->_satCodeBiasIF) - DotProduct(AA.Row(iObs), x0);
+
   }
 
Index: trunk/BNC/src/combination/bnccomb.h
===================================================================
--- trunk/BNC/src/combination/bnccomb.h	(revision 9807)
+++ trunk/BNC/src/combination/bnccomb.h	(revision 9819)
@@ -84,8 +84,8 @@
    public:
     cmbCorr() {
-      _eph        = 0;
-      _iod        = 0;
-      _dClkResult = 0.0;
-      _codeBiasIF = 0.0;
+      _eph                        = 0;
+      _iod                        = 0;
+      _dClkResult                 = 0.0;
+      _satCodeBiasIF              = 0.0;
     }
     ~cmbCorr() {}
@@ -98,5 +98,5 @@
     t_satCodeBias  _satCodeBias;
     QString        _acName;
-    double         _codeBiasIF;
+    double         _satCodeBiasIF;
     double         _dClkResult;
     ColumnVector   _diffRao;
