Small bugfix regarding single span documents
diff --git a/lib/KorAP/Tokenizer/Spans.pm b/lib/KorAP/Tokenizer/Spans.pm
index 7eb31c0..5e5cec6 100644
--- a/lib/KorAP/Tokenizer/Spans.pm
+++ b/lib/KorAP/Tokenizer/Spans.pm
@@ -17,6 +17,7 @@
   # my $spans = XML::LibXML->load_xml(string => $file);
 
   my $spans = xml2hash($file, text => '#text', attr => '-')->{layer}->{spanList}->{span};
+  $spans = [$spans] if ref $spans ne 'ARRAY';
 
   my ($should, $have) = (0,0);
   my ($from, $to, $h);
diff --git a/lib/KorAP/Tokenizer/Tokens.pm b/lib/KorAP/Tokenizer/Tokens.pm
index 58ff6fa..ceb2e4c 100644
--- a/lib/KorAP/Tokenizer/Tokens.pm
+++ b/lib/KorAP/Tokenizer/Tokens.pm
@@ -14,6 +14,8 @@
 #  my $spans = Mojo::DOM->new($file);
 #  $spans->xml(1);
   my $spans = xml2hash($file, text => '#text', attr => '-')->{layer}->{spanList}->{span};
+  $spans = [$spans] if ref $spans ne 'ARRAY';
+
 
   my ($should, $have) = (0,0);