Lib ldb minor fixes