Fixed some n+1 queries.