Some obvious issues fixed in the filter code