Fix:Error cause by closing SQLite