fixed db temporarity, cursors closes, synchronization, api bugs