Index: src/DbLinq/Data/Linq/DataContext.cs
===================================================================
--- src/DbLinq/Data/Linq/DataContext.cs	(revision 1239)
+++ src/DbLinq/Data/Linq/DataContext.cs	(working copy)
@@ -1046,7 +1046,12 @@
             //connection closing should not be done here.
             //read: http://msdn2.microsoft.com/en-us/library/bb292288.aspx
 
-			//We own the instance of MemberModificationHandler - we must unregister listeners of entities we attached to
+            if (Log != null)
+            {
+                Log.Flush();
+            }
+
+            //We own the instance of MemberModificationHandler - we must unregister listeners of entities we attached to
 			MemberModificationHandler.UnregisterAll();
         }
 
@@ -1089,6 +1094,7 @@
         {
             if (Log != null)
             {
+                Log.WriteLine("-- Executing database command:");
                 Log.WriteLine(command.CommandText);
                 foreach (IDbDataParameter parameter in command.Parameters)
                     WriteLog(parameter);
Index: src/DbLinq/Util/TextWriterExtension.cs
===================================================================
--- src/DbLinq/Util/TextWriterExtension.cs	(revision 1239)
+++ src/DbLinq/Util/TextWriterExtension.cs	(working copy)
@@ -50,6 +50,7 @@
             // we just ignore NREs
             catch (NullReferenceException)
             {
+                // TODO: fix the NREs properly and remove this, so expression trees in the log are complete.
             }
         }
 
@@ -166,7 +167,7 @@
             var lines = new List<string>
                             {
                                 WriteHeader(expression, header, depth++),
-                                WriteLiteral(expression.Constructor.Name, "Ctor", depth)
+                                WriteLiteral(System.Reflection.ConstructorInfo.ConstructorName, "Ctor", depth)
                             };
             for (int i = 0; i < expression.Arguments.Count; i++)
                 lines.AddRange(Write(expression.Arguments[i], string.Format("#{0:0##}", i), depth));
