fix bugs with opening annotation modal and with cursor position when creating new annotations