work on lmdb driver
some fixes