Fixed bug in saving annotations