diff --git a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
index bbe3773..377bda9 100644
--- a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
+++ b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
@@ -426,15 +426,25 @@ namespace Banshee.Dap.AppleDevice
 
         private void DeleteTrack (GPod.Track track, bool removeFile)
         {
+            Console.WriteLine ("___MediaDatabase is null: " + (MediaDatabase == null).ToString ());
+            Console.WriteLine ("___MediaDatabase.Playlists is null: " + (MediaDatabase.Playlists == null).ToString ());
             foreach (var playlist in MediaDatabase.Playlists) {
+                Console.WriteLine ("___playlist is null: " + (playlist == null).ToString ());
+                Console.WriteLine ("___playlist.Tracks is null: " + (playlist.Tracks == null).ToString ());
                 playlist.Tracks.Remove (track);
             }
 
+            Console.WriteLine ("___track is null: " + (track == null).ToString ());
             if (SupportsPodcasts && track.MediaType == GPod.MediaType.Podcast) {
+                Console.WriteLine ("___MediaDatabase.PodcastsPlaylist is null: " + (MediaDatabase.PodcastsPlaylist == null).ToString ());
+                Console.WriteLine ("___MediaDatabase.PodcastsPlaylist.Tracks is null: " + (MediaDatabase.PodcastsPlaylist.Tracks == null).ToString ());
                 MediaDatabase.PodcastsPlaylist.Tracks.Remove (track);
             }
 
+            Console.WriteLine ("___MediaDatabase.MasterPlaylist is null: " + (MediaDatabase.MasterPlaylist == null).ToString ());
+            Console.WriteLine ("___MediaDatabase.MasterPlaylist.Tracks is null: " + (MediaDatabase.MasterPlaylist.Tracks == null).ToString ());
             MediaDatabase.MasterPlaylist.Tracks.Remove (track);
+            Console.WriteLine ("___MediaDatabase.Tracks is null: " + (MediaDatabase.Tracks == null).ToString ());
             MediaDatabase.Tracks.Remove (track);
 
             if (removeFile) {
