Fix incorrect behaviour for spec annotating.