Fix wrong gid param to has_annotations