minor fix to generate_annotations