Fixed some prblems in KVStore