@dylanahsmith: Hm good point. I copied most of this from the sort filter a few lines above.