fix leveldb counters