filtering/ sort null fix