diff --git a/src/Unit.cpp b/src/Unit.cpp
index 9b30f7b2ecb6f80f897e57437a78022c9325a28d..7f8b1e8dfaf87fceaf9022570c0657f7c320e241 100644
--- a/src/Unit.cpp
+++ b/src/Unit.cpp
@@ -305,12 +305,12 @@ Unit Unit::getTarget() const
         //if unit has order, check tag of target of first order
         if(getUnitPtr()->orders.size() > 0){
           //pray that this value can be declared as CCUnitID
-	  CCUnitID t_id = getUnitPtr()->orders[0].target_unit_tag;
+	      CCUnitID t_id = getUnitPtr()->orders[0].target_unit_tag;
           //let IDAbot find the unit with this tag
           return m_bot->GetUnit(t_id);
-	}
+	    }
 
-	return;
+	return m_unit;
 }
 
 bool Unit::isBlip() const