Fixed critical bug when saving annotations