Clean up association query.