fixed profinity filtering function