Fixed incorrectly applied filters. Fixes #891