fix slow query on open issues page