Annotator Tools: Fix major logic bug in code

(cherry picked from commit 71e9f4488bf8b3c8b094da94cb69f0a8f141cdd7)