Corrected undefined variable error in annotations.js