Some fixes for the tmSearchAndFilter

Fixes for issues #35 and #36