diff --git a/question/format/xml/format.php b/question/format/xml/format.php
index 65b3bae6c7a..3b3d904bf71 100755
--- a/question/format/xml/format.php
+++ b/question/format/xml/format.php
@@ -886,7 +886,7 @@ class qformat_xml extends qformat_default {
$expout .= " $tolerance\n";
$expout .= " $tolerancetype\n";
$expout .= " $correctanswerformat\n";
- $expout .= " $correctanswerformat\n";
+ $expout .= " $correctanswerlength\n";
$expout .= " ".$this->writetext( $answer->feedback )."\n";
$expout .= "\n";
}