diff --git a/question/format/xml/format.php b/question/format/xml/format.php
index 07079124696..e4017647e3a 100755
--- a/question/format/xml/format.php
+++ b/question/format/xml/format.php
@@ -948,7 +948,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";
}