diff --git a/timeseriesviewer/crosshair.py b/timeseriesviewer/crosshair.py
index 107184ae7f92f0b15ef66275a11f745ed14204a3..0487eb5a7a4a60d49ad333171f8a3b567047f168 100644
--- a/timeseriesviewer/crosshair.py
+++ b/timeseriesviewer/crosshair.py
@@ -497,7 +497,7 @@ class CrosshairDialog(QgsDialog):
         for lyr in mapCanvas.layers():
             s = ""
         lyrs = mapCanvas.layers()
-        canvas.setLayerSet([QgsMapCanvasLayer(l) for l in lyrs])
+        canvas.setLayers(lyrs)
         canvas.setDestinationCrs(mapCanvas.mapSettings().destinationCrs())
         canvas.setExtent(mapCanvas.extent())
         canvas.setCenter(mapCanvas.center())
@@ -510,8 +510,9 @@ if __name__ == '__main__':
     import site, sys
     #add site-packages to sys.path as done by enmapboxplugin.py
 
-    from timeseriesviewer import sandbox
-    qgsApp = sandbox.initQgisEnvironment()
+    from timeseriesviewer.utils import initQgisApplication
+    import example.Images
+    qgsApp = initQgisApplication()
 
     if False:
         c = QgsMapCanvas()
@@ -525,10 +526,10 @@ if __name__ == '__main__':
 
 
     import example.Images
-    lyr = QgsRasterLayer(example.Images.Img_2012_05_09_LE72270652012130EDC00_BOA)
+    lyr = QgsRasterLayer(example.Images.Img_2014_05_31_LE72270652014151CUB00_BOA)
     QgsProject.instance().addMapLayer(lyr)
     refCanvas = QgsMapCanvas()
-    refCanvas.setLayerSet([QgsMapCanvasLayer(lyr)])
+    refCanvas.setLayers([lyr])
     refCanvas.setExtent(lyr.extent())
     refCanvas.setDestinationCrs(lyr.crs())
     refCanvas.show()
diff --git a/timeseriesviewer/spectrallibraries.py b/timeseriesviewer/spectrallibraries.py
index fb5bd0a707c48a77c370a54880ef057ea0cd2389..6b994f2f0851961a9f0cd84337c2c8631716bea3 100644
--- a/timeseriesviewer/spectrallibraries.py
+++ b/timeseriesviewer/spectrallibraries.py
@@ -1317,8 +1317,6 @@ class SpectralLibraryTableViewModel(QAbstractTableModel):
 
 
         self.mAttributeColumns = []
-
-
         self.mSpecLib = SpectralLibrary()
         self.mProfileWrappers = OrderedDict()
 
@@ -1439,9 +1437,9 @@ class SpectralLibraryTableViewModel(QAbstractTableModel):
         assert isinstance(profile, SpectralProfile)
         #return self.createIndex(self.mSpecLib.index(profile), 0)
         #pw = self.mProfileWrappers[profile]
-        if not profile in self.mProfileWrappers.keys():
+        if not self.mProfileWrappers.__contains__(profile):
             return None
-        return self.createIndex(self.mProfileWrappers.keys().index(profile), 0)
+        return self.createIndex(list(self.mProfileWrappers.keys()).index(profile), 0)
 
 
 
@@ -1956,7 +1954,7 @@ if __name__ == "__main__":
     app.messageLog().messageReceived.connect(lambda args: print(args) )
 
 
-    sl = SpectralLibrary.readFrom(r'D:\Temp\myspeclibPX.sli')
+    sl = SpectralLibrary.readFrom(r'C:\Users\geo_beja\Repositories\QGIS_Plugins\enmap-box\enmapboxtestdata\SpecLib_BerlinUrbanGradient.sli')
 
     cb = QComboBox()
     m = UnitComboBoxItemModel()
diff --git a/timeseriesviewer/utils.py b/timeseriesviewer/utils.py
index 6bfc079956550a5cb3193f9a757fd2b6b73ce978..36b7cb7b5dd341dd95c340ed1423b5d2e95c0156 100644
--- a/timeseriesviewer/utils.py
+++ b/timeseriesviewer/utils.py
@@ -278,6 +278,7 @@ def createGeoTransform(gsd, ul_x, ul_y):
     gt2 = gt4 = 0
 
     return (gt0, gt1, gt2, gt3, gt4, gt5)
+
 def geo2px(geo, gt):
     """
     Returns the pixel position related to a Geo-Coordinate as integer number.