diff --git a/SleepLib/session.cpp b/SleepLib/session.cpp
index ae8b77e7..d4a94d1a 100644
--- a/SleepLib/session.cpp
+++ b/SleepLib/session.cpp
@@ -436,7 +436,7 @@ EventDataType Session::min(ChannelID id)
     EventDataType min,t1;
     for (int i=0;i<evec.size();i++) {
         t1=evec[i]->min();
-        if (t1==evec[i]->max()) continue;
+        if (t1==0 && t1==evec[i]->max()) continue;
         if (first) {
             min=t1;
             first=false;
@@ -462,7 +462,7 @@ EventDataType Session::max(ChannelID id)
     EventDataType max,t1;
     for (int i=0;i<evec.size();i++) {
         t1=evec[i]->max();
-        if (t1==evec[i]->min()) continue;
+        if (t1==0 && t1==evec[i]->min()) continue;
         if (first) {
             max=t1;
             first=false;
@@ -524,6 +524,13 @@ qint64 Session::last(ChannelID id)
     m_lastchan[id]=max;
     return max;
 }
+bool Session::hasChannel(ChannelID id)
+{
+    QHash<ChannelID,QVector<EventList *> >::iterator j=eventlist.find(id);
+    if (j==eventlist.end())
+        return false;
+    return true;
+}
 
 int Session::count(ChannelID id)
 {
diff --git a/SleepLib/session.h b/SleepLib/session.h
index 0d91237e..85745cab 100644
--- a/SleepLib/session.h
+++ b/SleepLib/session.h
@@ -111,6 +111,7 @@ public:
 
     EventDataType percentile(ChannelID id,EventDataType percentile);
 
+    bool hasChannel(ChannelID id);
 
     bool IsLoneSession() { return s_lonesession; }
     void SetLoneSession(bool b) { s_lonesession=b; }
diff --git a/daily.cpp b/daily.cpp
index 810feb37..e3a26bd2 100644
--- a/daily.cpp
+++ b/daily.cpp
@@ -61,16 +61,13 @@ Daily::Daily(QWidget *parent,QGLWidget * shared, MainWindow *mw)
     ui->graphLayout->addWidget(scrollArea,1);
 
     scrollArea->setWidgetResizable(true);
-    //QVBoxLayout *lay=new QVBoxLayout(scrollArea);
-    //scrollArea->setWidget(lay);
+
     GraphLayout=new QWidget(scrollArea);
     scrollArea->setWidget(GraphLayout);
 
-    //lay->addWidget(GraphLayout,1);
-    //ui->webView->setStyleSheet("QWebView { background-color: qlineargradient(x1: 0, y1: 0, x2: 0.5, y2: 0.5, stop: 0 #FF92BB, stop: 1 white); }");
-    //ui->treeWidget->setAlternatingRowColors(true);
     splitter=new QVBoxLayout(GraphLayout);
     GraphLayout->setLayout(splitter);
+    splitter->setSpacing(0);
     splitter->setMargin(0);
     splitter->setContentsMargins(0,0,0,0);