fixed small error in _generate_bibtex_key