Fixed slow query.