fixing annotation script bugs