fix most of #13

Confusables might still crash the count query around line 82
in searchresult.class.php
Merge branch 'fix-search'