Fixed too intensive threading problem.
Fixed incorrect queries detection.
Merge remote-tracking branch 'origin/master'