fix some issues related to creating annotations