bug: encryption process will not complete if a database is empty