Fixed a null pointer error in annotations.py