LevelDB load/write fixes