Fixed bugs in annotatotr