Filter chain fixes

Fixes for issue #16.