Fixed output of filter function