fixing minor issues in cashing, queries, hash key changed to simple string for stats object