Adding inner join to remove N+1 queries.