fix race-condition on setting annotation types when fetching annotations / document