diff --git a/amd/src/jmodule.js b/amd/src/jmodule.js
index 2a8ca8ba7ed82af709ac74c5579d94ae01cf0961..06e381c927ff9322a178dcad705ce62bbc5059b7 100644
--- a/amd/src/jmodule.js
+++ b/amd/src/jmodule.js
@@ -121,6 +121,7 @@ define(['jquery'], function ($) {
                         search(searchstring, reloadList, displaymode, instanceid, sesskey, contextid, idsearching, orderbysemester, wwwroot);
                     } else {
                         // Search start after 3 chars or searching by id.
+                        $('#hshcourselistul').children().remove();
                     }
                 }
             });