Fix: improper matching for activities in detail trigger when user_id is NULL