Tweak filter code