Fixed the Application Launcher button in the VAB/SPH by making use of the new AppLauncherButton wrapper class.
Fixed the Application Launcher button in the VAB/SPH by making use of the new AppLauncherButton wrapper class.

--- a/Documents/CHANGES.txt
+++ b/Documents/CHANGES.txt
@@ -1,3 +1,15 @@
+    Changed: Thermal flux is now correctly indicated in kilowatts.
+
+1.0.19.4, 12-02-16
+    Fixed: Only 'STAGE_STACK_FLOW' and 'STAGE_STACK_FLOW_BALANCE' resources include surface mounted parts as fuel targets.
+    Fixed: Fairing mass being doubled in the VAB (removed workaround for a KSP bug which has been fixed).
+
+1.0.19.3, 09-02-16
+    Fixed: Fuel cross-feed from surface attached parts.
+
+1.0.19.2, 19-11-15
+    Rebuild for KSP 1.0.5.1028 silent update.
+    
 1.0.19.1, 09-11-15
     Added: Key binding editor accessible under 'Settings' on the Build Engineer.
     Added: Added current vessel name readout. (antplant)

--- /dev/null
+++ b/KerbalEngineer/AppLauncherButton.cs
@@ -1,1 +1,162 @@
+// 
+//     Kerbal Engineer Redux
+// 
+//     Copyright (C) 2016 CYBUTEK
+// 
+//     This program is free software: you can redistribute it and/or modify
+//     it under the terms of the GNU General Public License as published by
+//     the Free Software Foundation, either version 3 of the License, or
+//     (at your option) any later version.
+// 
+//     This program is distributed in the hope that it will be useful,
+//     but WITHOUT ANY WARRANTY; without even the implied warranty of
+//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//     GNU General Public License for more details.
+//     You should have received a copy of the GNU General Public License
+//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//  
 
+namespace KerbalEngineer
+{
+    using KSP.UI.Screens;
+    using UnityEngine;
+
+    public class AppLauncherButton : MonoBehaviour
+    {
+        public enum ButtonState
+        {
+            Disabled,
+            On,
+            Off
+        }
+
+        private ApplicationLauncherButton m_Button;
+
+        /// <summary>
+        ///     Sets the state of the button.
+        /// </summary>
+        public void SetState(ButtonState state)
+        {
+            if (m_Button == null)
+            {
+                return;
+            }
+
+            switch (state)
+            {
+                case ButtonState.Disabled:
+                    Disable();
+                    break;
+
+                case ButtonState.On:
+                    Enable();
+                    m_Button.SetTrue();
+                    break;
+
+                case ButtonState.Off:
+                    Enable();
+                    m_Button.SetFalse();
+                    break;
+            }
+        }
+
+        protected virtual void Awake()
+        {
+            // subscribe event listeners
+            GameEvents.onGUIApplicationLauncherReady.Add(OnGUIApplicationLauncherReady);
+            GameEvents.onGUIApplicationLauncherUnreadifying.Add(OnGUIApplicationLauncherUnreadifying);
+        }
+
+        protected virtual void OnDestroy()
+        {
+            // unsubscribe event listeners
+            GameEvents.onGUIApplicationLauncherReady.Remove(OnGUIApplicationLauncherReady);
+            GameEvents.onGUIApplicationLauncherUnreadifying.Remove(OnGUIApplicationLauncherUnreadifying);
+        }
+
+        /// <summary>
+        ///     Called on button being disabled.
+        /// </summary>
+        protected virtual void OnDisable() { }
+
+        /// <summary>
+        ///     Called on button being enabled.
+        /// </summary>
+        protected virtual void OnEnable() { }
+
+        /// <summary>
+        ///     Called on button being toggled off.
+        /// </summary>
+        protected virtual void OnFalse() { }
+
+        /// <summary>
+        ///     Called on mouse hovering.
+        /// </summary>
+        protected virtual void OnHover() { }
+
+        /// <summary>
+        ///     Called on mouse exiting hover.
+        /// </summary>
+        protected virtual void OnHoverOut() { }
+
+        /// <summary>
+        ///     Called on button being ready.
+        /// </summary>
+        protected virtual void OnReady() { }
+
+        /// <summary>
+        ///     Called after the application launcher is ready and the button created.
+        /// </summary>
+        protected virtual void OnTrue() { }
+
+        /// <summary>
+        ///     Called after the application launcher is unreadified and the button removed.
+        /// </summary>
+        protected virtual void OnUnreadifying() { }
+
+        /// <summary>
+        ///     Disables the button if not already disabled.
+        /// </summary>
+        private void Disable()
+        {
+            if (m_Button != null && m_Button.toggleButton.Button.interactable)
+            {
+                m_Button.Disable();
+            }
+        }
+
+        /// <summary>
+        ///     Enables the button if not already enabled.
+        /// </summary>
+        private void Enable()
+        {
+            if (m_Button != null && m_Button.toggleButton.Button.interactable == false)
+            {
+                m_Button.Enable();
+            }
+        }
+
+        private void OnGUIApplicationLauncherReady()
+        {
+            // create button
+            if (ApplicationLauncher.Instance != null)
+            {
+                Texture iconTexture = GameDatabase.Instance.GetTexture("KerbalEngineer/Textures/ToolbarIcon", false);
+                m_Button = ApplicationLauncher.Instance.AddModApplication(OnTrue, OnFalse, OnHover, OnHoverOut, OnEnable, OnDisable, ApplicationLauncher.AppScenes.ALWAYS, iconTexture);
+            }
+
+            OnReady();
+        }
+
+        private void OnGUIApplicationLauncherUnreadifying(GameScenes scene)
+        {
+            // remove button
+            if (ApplicationLauncher.Instance != null && m_Button != null)
+            {
+                ApplicationLauncher.Instance.RemoveModApplication(m_Button);
+            }
+
+            OnUnreadifying();
+        }
+    }
+}

--- /dev/null
+++ b/KerbalEngineer/Editor/BuildAppLauncher.cs
@@ -1,1 +1,67 @@
+// 
+//     Kerbal Engineer Redux
+// 
+//     Copyright (C) 2016 CYBUTEK
+// 
+//     This program is free software: you can redistribute it and/or modify
+//     it under the terms of the GNU General Public License as published by
+//     the Free Software Foundation, either version 3 of the License, or
+//     (at your option) any later version.
+// 
+//     This program is distributed in the hope that it will be useful,
+//     but WITHOUT ANY WARRANTY; without even the implied warranty of
+//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//     GNU General Public License for more details.
+//     You should have received a copy of the GNU General Public License
+//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//  
 
+namespace KerbalEngineer.Editor
+{
+    [KSPAddon(KSPAddon.Startup.EditorAny, false)]
+    public class BuildAppLauncher : AppLauncherButton
+    {
+        protected override void OnFalse()
+        {
+            if (BuildAdvanced.Instance != null)
+            {
+                BuildAdvanced.Instance.Visible = false;
+            }
+        }
+
+        protected override void OnTrue()
+        {
+            if (BuildAdvanced.Instance != null)
+            {
+                BuildAdvanced.Instance.Visible = true;
+            }
+        }
+
+        protected virtual void Update()
+        {
+            if (BuildAdvanced.Instance == null)
+            {
+                return;
+            }
+
+            // check if vessel is currently under construction with the presence of a root part
+            if (EditorLogic.RootPart != null)
+            {
+                // set button state based on existing visibility
+                if (BuildAdvanced.Instance.Visible)
+                {
+                    SetState(ButtonState.On);
+                }
+                else
+                {
+                    SetState(ButtonState.Off);
+                }
+            }
+            else
+            {
+                // disable button
+                SetState(ButtonState.Disabled);
+            }
+        }
+    }
+}

--- a/KerbalEngineer/Editor/BuildOverlayPartInfo.cs
+++ b/KerbalEngineer/Editor/BuildOverlayPartInfo.cs
@@ -28,7 +28,7 @@
     public class BuildOverlayPartInfo : MonoBehaviour
     {
         private static bool clickToOpen = true;
-        private static ModuleGenerator.GeneratorResource generatorResource;
+        private static ModuleResource generatorResource;
         private static ModuleAlternator moduleAlternator;
         private static ModuleDataTransmitter moduleDataTransmitter;
         private static ModuleDeployableSolarPanel moduleDeployableSolarPanel;
@@ -131,7 +131,7 @@
                     position.x = Input.mousePosition.x - 3 - position.width;
                 }
 
-                part = EditorLogic.fetch.ship.parts.Find(p => p.stackIcon.highlightIcon) ?? EditorLogic.SelectedPart;
+                part = EditorLogic.fetch.ship.parts.Find(p => p.stackIcon.Highlighted) ?? EditorLogic.SelectedPart;
                 if (part != null)
                 {
                     if (!part.Equals(selectedPart))

--- a/KerbalEngineer/Editor/BuildToolbar.cs
+++ /dev/null
@@ -1,120 +1,1 @@
-// 
-//     Kerbal Engineer Redux
-// 
-//     Copyright (C) 2014 CYBUTEK
-// 
-//     This program is free software: you can redistribute it and/or modify
-//     it under the terms of the GNU General Public License as published by
-//     the Free Software Foundation, either version 3 of the License, or
-//     (at your option) any later version.
-// 
-//     This program is distributed in the hope that it will be useful,
-//     but WITHOUT ANY WARRANTY; without even the implied warranty of
-//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//     GNU General Public License for more details.
-// 
-//     You should have received a copy of the GNU General Public License
-//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-// 
 
-#region Using Directives
-
-using System;
-
-using UnityEngine;
-
-#endregion
-
-namespace KerbalEngineer.Editor
-{
-    [KSPAddon(KSPAddon.Startup.EditorAny, false)]
-    public class BuildToolbar : MonoBehaviour
-    {
-        #region Fields
-
-        private ApplicationLauncherButton button;
-
-        #endregion
-
-        #region Methods: private
-
-        private void Awake()
-        {
-            GameEvents.onGUIApplicationLauncherReady.Add(this.OnGuiAppLauncherReady);
-            Logger.Log("BuildToolbar->Awake");
-        }
-
-        private void Start()
-        {
-            if (button == null)
-            {
-                OnGuiAppLauncherReady();
-            }
-        }
-
-        private void OnDestroy()
-        {
-            GameEvents.onGUIApplicationLauncherReady.Remove(this.OnGuiAppLauncherReady);
-            if (this.button != null)
-            {
-                ApplicationLauncher.Instance.RemoveModApplication(this.button);
-            }
-            Logger.Log("BuildToolbar->OnDestroy");
-        }
-
-        private void OnGuiAppLauncherReady()
-        {
-            try
-            {
-                this.button = ApplicationLauncher.Instance.AddModApplication(
-                    () => BuildAdvanced.Instance.Visible = true,
-                    () => BuildAdvanced.Instance.Visible = false,
-                    null,
-                    null,
-                    null,
-                    null,
-                    ApplicationLauncher.AppScenes.ALWAYS,
-                    GameDatabase.Instance.GetTexture("KerbalEngineer/Textures/ToolbarIcon", false)
-                    );
-                Logger.Log("BuildToolbar->OnGuiAppLauncherReady");
-            }
-            catch (Exception ex)
-            {
-                Logger.Exception(ex, "BuildToolbar->OnGuiAppLauncherReady");
-            }
-        }
-
-        private void Update()
-        {
-            try
-            {
-                if (this.button == null)
-                {
-                    return;
-                }
-
-                if (EditorLogic.fetch != null && EditorLogic.fetch.ship.parts.Count > 0)
-                {
-                    if (BuildAdvanced.Instance.Visible && this.button.State != RUIToggleButton.ButtonState.TRUE)
-                    {
-                        this.button.SetTrue();
-                    }
-                    else if (!BuildAdvanced.Instance.Visible && this.button.State != RUIToggleButton.ButtonState.FALSE)
-                    {
-                        this.button.SetFalse();
-                    }
-                }
-                else if (this.button.State != RUIToggleButton.ButtonState.DISABLED)
-                {
-                    this.button.Disable();
-                }
-            }
-            catch (Exception ex)
-            {
-                Logger.Exception(ex, "BuildToolbar->Update");
-            }
-        }
-
-        #endregion
-    }
-}

--- a/KerbalEngineer/EngineerGlobals.cs
+++ b/KerbalEngineer/EngineerGlobals.cs
@@ -25,7 +25,7 @@
         /// <summary>
         ///     Current version of the Kerbal Engineer assembly.
         /// </summary>
-        public const string ASSEMBLY_VERSION = "1.0.19.3";
+        public const string ASSEMBLY_VERSION = "1.0.19.4";
 
         private static string assemblyFile;
         private static string assemblyName;

--- a/KerbalEngineer/Flight/ActionMenu.cs
+++ b/KerbalEngineer/Flight/ActionMenu.cs
@@ -27,6 +27,8 @@
 
 namespace KerbalEngineer.Flight
 {
+    using KSP.UI.Screens;
+
     /// <summary>
     ///     Graphical controller for section interaction in the form of a menu system.
     /// </summary>
@@ -90,11 +92,11 @@
                 {
                     return;
                 }
-                if (FlightEngineerCore.IsDisplayable && this.button.State == RUIToggleButton.ButtonState.DISABLED)
+                if (FlightEngineerCore.IsDisplayable && this.button.toggleButton.Interactable == false)
                 {
                     this.button.Enable();
                 }
-                else if (!FlightEngineerCore.IsDisplayable && this.button.State != RUIToggleButton.ButtonState.DISABLED)
+                else if (!FlightEngineerCore.IsDisplayable && this.button.toggleButton.Interactable)
                 {
                     this.button.Disable();
                 }

--- a/KerbalEngineer/Helpers/TimeFormatter.cs
+++ b/KerbalEngineer/Helpers/TimeFormatter.cs
@@ -28,11 +28,11 @@
 
             if (seconds > 0.0)
             {
-                years = (int)(seconds / KSPUtil.Year);
-                seconds -= years * KSPUtil.Year;
+                years = (int)(seconds / KSPUtil.dateTimeFormatter.Year);
+                seconds -= years * KSPUtil.dateTimeFormatter.Year;
 
-                days = (int)(seconds / KSPUtil.Day);
-                seconds -= days * KSPUtil.Day;
+                days = (int)(seconds / KSPUtil.dateTimeFormatter.Day);
+                seconds -= days * KSPUtil.dateTimeFormatter.Day;
 
                 hours = (int)(seconds / 3600.0);
                 seconds -= hours * 3600.0;

--- a/KerbalEngineer/Helpers/Units.cs
+++ b/KerbalEngineer/Helpers/Units.cs
@@ -127,7 +127,7 @@
 
         public static string ToFlux(double value)
         {
-            return value.ToString("#,0.00") + "W";
+            return value.ToString("#,0.00") + "kW";
         }
 
         public static string ToForce(double value)

--- a/KerbalEngineer/KerbalEngineer.csproj
+++ b/KerbalEngineer/KerbalEngineer.csproj
@@ -241,6 +241,22 @@
       <HintPath>..\..\Game\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
       <Private>False</Private>
     </Reference>
+    <Reference Include="Assembly-CSharp-firstpass">
+      <HintPath>..\..\game\KSP_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="KSPAssets">
+      <HintPath>..\..\game\KSP_Data\Managed\KSPAssets.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="KSPCore">
+      <HintPath>..\..\game\KSP_Data\Managed\KSPCore.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="KSPUtil">
+      <HintPath>..\..\game\KSP_Data\Managed\KSPUtil.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
     <Reference Include="System">
       <HintPath>..\Game\KSP_Data\Managed\System.dll</HintPath>
       <Private>False</Private>
@@ -251,6 +267,10 @@
     </Reference>
     <Reference Include="UnityEngine">
       <HintPath>..\..\Game\KSP_Data\Managed\UnityEngine.dll</HintPath>
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="UnityEngine.UI">
+      <HintPath>..\..\game\KSP_Data\Managed\UnityEngine.UI.dll</HintPath>
       <Private>False</Private>
     </Reference>
   </ItemGroup>

--- a/KerbalEngineer/KeyBinding/KeyBindPopup.cs
+++ b/KerbalEngineer/KeyBinding/KeyBindPopup.cs
@@ -179,6 +179,10 @@
             GUILayout.BeginVertical(HighLogic.Skin.textArea);
             GUILayout.Label("Key Bind: " + Name);
             GUILayout.Label("Selected: " + Binding);
+            if (GUILayout.Button("Clear", HighLogic.Skin.button))
+            {
+                Binding = KeyCode.None;
+            }
             GUILayout.EndVertical();
 
             // Window buttons.

--- a/KerbalEngineer/TapeDriveAnimator.cs
+++ b/KerbalEngineer/TapeDriveAnimator.cs
@@ -83,6 +83,8 @@
         private bool sceneIsEditor;
         private float speed;
         private float targetSpeed;
+        private Renderer renderer;
+        private Light light;
 
         #endregion
 
@@ -120,6 +122,8 @@
 
         public override void OnStart(StartState state)
         {
+            renderer = GetComponent<Renderer>();
+
             this.random = new Random();
 
             this.StopBakedAnimation();
@@ -167,37 +171,37 @@
             if (this.Lights1 != "")
             {
                 this.lights1Transform = this.part.FindModelTransform(this.Lights1);
-                this.lights1ShaderOff = this.lights1Transform.renderer.material.shader;
+                this.lights1ShaderOff = renderer.material.shader;
             }
 
             if (this.Lights2 != "")
             {
                 this.lights2Transform = this.part.FindModelTransform(this.Lights2);
-                this.lights2ShaderOff = this.lights2Transform.renderer.material.shader;
+                this.lights2ShaderOff = renderer.material.shader;
             }
 
             if (this.Lights3 != "")
             {
                 this.lights3Transform = this.part.FindModelTransform(this.Lights3);
-                this.lights3ShaderOff = this.lights3Transform.renderer.material.shader;
+                this.lights3ShaderOff = renderer.material.shader;
             }
 
             if (this.Lights4 != "")
             {
                 this.lights4Transform = this.part.FindModelTransform(this.Lights4);
-                this.lights4ShaderOff = this.lights4Transform.renderer.material.shader;
+                this.lights4ShaderOff = renderer.material.shader;
             }
 
             if (this.Lights5 != "")
             {
                 this.lights5Transform = this.part.FindModelTransform(this.Lights5);
-                this.lights5ShaderOff = this.lights5Transform.renderer.material.shader;
+                this.lights5ShaderOff = renderer.material.shader;
             }
 
             if (this.Lights6 != "")
             {
                 this.lights6Transform = this.part.FindModelTransform(this.Lights6);
-                this.lights6ShaderOff = this.lights6Transform.renderer.material.shader;
+                this.lights6ShaderOff = renderer.material.shader;
             }
 
             this.lightsShaderOn = Shader.Find("Unlit/Texture");
@@ -381,7 +385,7 @@
                 lightsOn = (this.speed == 0);
             }
 
-            lights.renderer.material.shader = lightsOn ? @on : off;
+            lights.GetComponent<Renderer>().material.shader = lightsOn ? @on : off;
         }
 
         #endregion

--- a/KerbalEngineer/VesselSimulator/EngineSim.cs
+++ b/KerbalEngineer/VesselSimulator/EngineSim.cs
@@ -388,6 +388,20 @@
                         break;
 
                     case ResourceFlowMode.STACK_PRIORITY_SEARCH:
+                        visited.Clear();
+
+                        if (SimManager.logOutput)
+                        {
+                            log = new LogMsg();
+                            log.buf.AppendLine("Find " + ResourceContainer.GetResourceName(type) + " sources for " + partSim.name + ":" + partSim.partId);
+                        }
+                        partSim.GetSourceSet(type, PhysicsGlobals.Stack_PriUsesSurf, allParts, visited, sourcePartSet, log, "");
+                        if (SimManager.logOutput && log != null)
+                        {
+                            MonoBehaviour.print(log.buf);
+                        }
+                        break;
+
                     case ResourceFlowMode.STAGE_STACK_FLOW:
                     case ResourceFlowMode.STAGE_STACK_FLOW_BALANCE:
                         visited.Clear();
@@ -397,8 +411,8 @@
                             log = new LogMsg();
                             log.buf.AppendLine("Find " + ResourceContainer.GetResourceName(type) + " sources for " + partSim.name + ":" + partSim.partId);
                         }
-                        partSim.GetSourceSet(type, allParts, visited, sourcePartSet, log, "");
-                        if (SimManager.logOutput)
+                        partSim.GetSourceSet(type, true, allParts, visited, sourcePartSet, log, "");
+                        if (SimManager.logOutput && log != null)
                         {
                             MonoBehaviour.print(log.buf);
                         }

--- a/KerbalEngineer/VesselSimulator/PartSim.cs
+++ b/KerbalEngineer/VesselSimulator/PartSim.cs
@@ -42,6 +42,7 @@
         public int decoupledInStage;
         public bool fuelCrossFeed;
         public List<PartSim> fuelTargets = new List<PartSim>();
+        public List<PartSim> surfaceMountFuelTargets = new List<PartSim>();
         public bool hasModuleEngines;
         public bool hasMultiModeEngine;
 
@@ -416,11 +417,7 @@
                 mass += resources.GetResourceMass(resources.Types[i]);
             }
 
-            if (hasVessel == false && isFairing && currentStage > inverseStage)
-            {
-                mass += fairingMass;
-            }
-            else if (hasVessel && isFairing && currentStage <= inverseStage)
+            if (isFairing && currentStage <= inverseStage)
             {
                 mass -= fairingMass;
             }
@@ -451,7 +448,7 @@
         // All functions below this point must not rely on the part member (it may be null)
         //
 
-        public void GetSourceSet(int type, List<PartSim> allParts, HashSet<PartSim> visited, HashSet<PartSim> allSources, LogMsg log, String indent)
+        public void GetSourceSet(int type, bool includeSurfaceMountedParts, List<PartSim> allParts, HashSet<PartSim> visited, HashSet<PartSim> allSources, LogMsg log, String indent)
         {
             if (log != null)
             {
@@ -489,7 +486,29 @@
                     {
                         if (log != null) log.buf.AppendLine(indent + "Adding fuel target as source (" + partSim.name + ":" + partSim.partId + ")");
 
-                        partSim.GetSourceSet(type, allParts, visited, allSources, log, indent);
+                        partSim.GetSourceSet(type, includeSurfaceMountedParts, allParts, visited, allSources, log, indent);
+                    }
+                }
+            }
+
+            // check surface mounted fuel targets
+            if (includeSurfaceMountedParts)
+            {
+                for (int i = 0; i < surfaceMountFuelTargets.Count; i++)
+                {
+                    PartSim partSim = this.surfaceMountFuelTargets[i];
+                    if (partSim != null)
+                    {
+                        if (visited.Contains(partSim))
+                        {
+                            if (log != null) log.buf.AppendLine(indent + "Fuel target already visited, skipping (" + partSim.name + ":" + partSim.partId + ")");
+                        }
+                        else
+                        {
+                            if (log != null) log.buf.AppendLine(indent + "Adding fuel target as source (" + partSim.name + ":" + partSim.partId + ")");
+
+                            partSim.GetSourceSet(type, true, allParts, visited, allSources, log, indent);
+                        }
                     }
                 }
             }
@@ -529,7 +548,7 @@
                                 {
                                     if (log != null) log.buf.AppendLine(indent + "Adding attached part as source (" + attachSim.attachedPartSim.name + ":" + attachSim.attachedPartSim.partId + ")");
 
-                                    attachSim.attachedPartSim.GetSourceSet(type, allParts, visited, allSources, log, indent);
+                                    attachSim.attachedPartSim.GetSourceSet(type, includeSurfaceMountedParts, allParts, visited, allSources, log, indent);
                                 }
                             }
                         }
@@ -576,7 +595,7 @@
                     else
                     {
                         lastCount = allSources.Count;
-                        this.parent.GetSourceSet(type, allParts, visited, allSources, log, indent);
+                        this.parent.GetSourceSet(type, includeSurfaceMountedParts, allParts, visited, allSources, log, indent);
                         if (allSources.Count > lastCount)
                         {
                             if (log != null) log.buf.AppendLine(indent + "Returning " + (allSources.Count  - lastCount) + " parent sources (" + this.name + ":" + this.partId + ")");
@@ -679,10 +698,10 @@
                 if (partSimLookup.TryGetValue(part.parent, out parent))
                 {
                     if (log != null) log.buf.AppendLine("Parent part is " + parent.name + ":" + parent.partId);
-                    if (part.attachMode == AttachModes.SRF_ATTACH && part.attachRules.srfAttach && part.fuelCrossFeed && parent.fuelCrossFeed)
-                    {
-                        if (log != null) log.buf.AppendLine("Added " + name + " to " + parent.name + " fuel targets. (srf_attach with crossfeed)");
-                        parent.fuelTargets.Add(this);
+                    if (part.attachMode == AttachModes.SRF_ATTACH && part.attachRules.srfAttach && part.fuelCrossFeed && part.parent.fuelCrossFeed)
+                    {
+                        if (log != null) log.buf.AppendLine("Added " + name + " to " + parent.name + " surface mounted fuel targets.");
+                        parent.surfaceMountFuelTargets.Add(this);
                     }
                 }
                 else

 Binary files a/Output/KerbalEngineer/KerbalEngineer.dll and b/Output/KerbalEngineer/KerbalEngineer.dll differ
--- a/Output/KerbalEngineer/KerbalEngineer.version
+++ b/Output/KerbalEngineer/KerbalEngineer.version
@@ -6,7 +6,7 @@
 		"MAJOR":1,
 		"MINOR":0,
 		"PATCH":19,
-		"BUILD":3
+		"BUILD":4
 	},
 	"KSP_VERSION":
 	{