Make filtering the library more robust
Merge branch 'develop' with filtering bugfix