diff --git a/src/action/action_attack.cpp b/src/action/action_attack.cpp
index 0c7639188..60c2616df 100644
--- a/src/action/action_attack.cpp
+++ b/src/action/action_attack.cpp
@@ -371,9 +371,9 @@ local void MoveToTarget(Unit* unit)
 	} else if( err<0 ) {
 #endif
 	    unit->State=unit->SubAction=0;
-	    DebugLevel0Fn("%d\n",unit->Orders[0].Action);
 	    // Return to old task?
 #ifdef NEW_ORDERS
+	    DebugLevel0Fn("%d\n",unit->Orders[0].Action);
 	    if( err==-2 ) {
 		DebugLevel0Fn("Target not reachable\n");
 	    }