bugfix to generate-names.pl and tests