Documents database API fixed