Fixes n+1 issue with the dashboard