Fix some bugs in SnippetAnnotator