Fix filtering of activities