External recommender crashes if there are no CASes
**Describe the bug**
External recommender crashes if there are no CASes that can be used for training.

**To Reproduce**
Steps to reproduce the behavior:
1. Set up a trainable external recommender, e.g. for named entities
2. Have no named entity annotations in your project
3. Observer exception when calling external recommender 

**Expected behavior**
There should not be an exception.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Please complete the following information:**
 - Version and build ID: 0.12.2

diff --git a/inception-pdf-editor/src/main/java/de/tudarmstadt/ukp/inception/pdfeditor/PdfAnnotationEditor.java b/inception-pdf-editor/src/main/java/de/tudarmstadt/ukp/inception/pdfeditor/PdfAnnotationEditor.java
index 1ed9dd7692..572f040a6f 100644
--- a/inception-pdf-editor/src/main/java/de/tudarmstadt/ukp/inception/pdfeditor/PdfAnnotationEditor.java
+++ b/inception-pdf-editor/src/main/java/de/tudarmstadt/ukp/inception/pdfeditor/PdfAnnotationEditor.java
@@ -334,6 +334,7 @@ public class PdfAnnotationEditor
         try {
             VID paramId = VID.parseOptional(aParams.getParameterValue("id").toString());
             if (paramId.isSynthetic()) {
+                getModelObject().clearArmedSlot();
                 Offset offset = new Offset(aParams);
                 Offset docOffset =
                     PdfAnnoRenderer.convertToDocumentOffset(offset, documentModel, pdfExtractFile);
@@ -384,7 +385,8 @@ public class PdfAnnotationEditor
             // Doing anything but selecting or creating a span annotation when a
             // slot is armed will unarm it
             if (getModelObject().isSlotArmed()
-                && !(action.equals(SELECT_SPAN) || action.equals(CREATE_SPAN))) {
+                && !(action.equals(SELECT_SPAN) || action.equals(CREATE_SPAN)
+                   || action.equals(DELETE_RECOMMENDATION))) {
                 getModelObject().clearArmedSlot();
             }
 
diff --git a/inception-pdf-editor/src/main/js/pdfanno/src/core/src/annotation/abstract.js b/inception-pdf-editor/src/main/js/pdfanno/src/core/src/annotation/abstract.js
index d19fe4fb2f..f0706217f6 100644
--- a/inception-pdf-editor/src/main/js/pdfanno/src/core/src/annotation/abstract.js
+++ b/inception-pdf-editor/src/main/js/pdfanno/src/core/src/annotation/abstract.js
@@ -97,24 +97,16 @@ export default class AbstractAnnotation extends EventEmitter {
    * Handle a click event.
    */
   handleClickEvent (e) {
-    this.toggleSelect()
+    if (!this.selected) {
+      this.toggleSelect()
+    }
 
     if (this.type !== 'textbox') {
-
       if (this.selected) {
-
         // TODO Use common function.
         let event = document.createEvent('CustomEvent')
         event.initCustomEvent('annotationSelected', true, true, this)
         window.dispatchEvent(event)
-
-      } else {
-
-        // TODO Use common function.
-        let event = document.createEvent('CustomEvent')
-        event.initCustomEvent('annotationDeselected', true, true, this)
-        window.dispatchEvent(event)
-
       }
     }
   }
diff --git a/pom.xml b/pom.xml
index 1fa10b70a7..8ac13dbec1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
     <uima.version>3.1.0</uima.version>
     <log4j.version>2.12.1</log4j.version>
 
-    <webanno.version>4.0.0-beta-2</webanno.version>
+    <webanno.version>4.0.0-SNAPSHOT</webanno.version>
     <lucene.version>7.3.1</lucene.version>
     <elasticsearch.version>6.3.0</elasticsearch.version>
     <mtas.version>7.3.0.3</mtas.version>
['inception-pdf-editor/src/main/java/de/tudarmstadt/ukp/inception/pdfeditor/PdfAnnotationEditor.java', 'pom.xml', 'inception-pdf-editor/src/main/js/pdfanno/src/core/src/annotation/abstract.js']