Fix issue with valid entity filtering catching essentially everything.
Should close #86
Merge branch 'dev'