Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java	(revision 32483)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java	(revision 32484)
@@ -82,9 +82,9 @@
                 data.storageFile = file;
                 GpxLayer gpxLayer = new GpxLayer(data, file.getName());
-                Main.main.addLayer(gpxLayer);
+                Main.getLayerManager().addLayer(gpxLayer);
                 if (Main.pref.getBoolean("marker.makeautomarkers", true)) {
                     MarkerLayer ml = new MarkerLayer(data, tr("Markers from {0}", file.getName()), file, gpxLayer);
                     if (ml.data.size() > 0) {
-                        Main.main.addLayer(ml);
+                        Main.getLayerManager().addLayer(ml);
                     }
                 }
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java	(revision 32483)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java	(revision 32484)
@@ -74,5 +74,4 @@
     @Override
     public void importData(File tcxFile, ProgressMonitor progressMonitor) throws IOException {
-        //this.tcxFile = tcxFile;
         parseFile(tcxFile);
 
@@ -80,5 +79,5 @@
         gpxData.storageFile = tcxFile;
         GpxLayer gpxLayer = new GpxLayer(gpxData, tcxFile.getName());
-        Main.main.addLayer(gpxLayer);
+        Main.getLayerManager().addLayer(gpxLayer);
         if (Main.pref.getBoolean("marker.makeautomarkers", true))
         {
@@ -86,8 +85,7 @@
             if (ml.data.size() > 0)
             {
-                Main.main.addLayer(ml);
+                Main.getLayerManager().addLayer(ml);
             }
         }
-
     }
 
