Fixed bugs in deleting annotations