Fix implementation of AnnotationAPI