Fix user_badges n+1 query