diff --git a/pae2xml.pl b/pae2xml.pl
index 56ab32b0a6fd83d34d78ae872b456e1ef5528046..8957a84c46b15ec86bdbaf5b41bfe53d4c8e7f60 100755
--- a/pae2xml.pl
+++ b/pae2xml.pl
@@ -633,7 +633,7 @@ sub raw_notehead {
   my ($duration, $dots) = @_;
   my %du=("0", "long", "9", "breve", "1", "whole", "2", "half", "4", "quarter",
           "8", "eighth", "6", "16th", "3", "32nd", "5", "64th", "7", "128th");
-  if ($duration && $du{$duration}) {
+  if (($duration ne "") && $du{$duration}) {
     my $res = "				<type>$du{$duration}</type>\n";
     $res .= repeat ("				<dot/>\n", length ($dots));
     return $res;