Fix second class resource filtering
Simplify second class resource filtering