fixed issue with filter function chaining