fixed sqlite3 database lock error cause by not closing the database and finalizing statements in DAO.m methods.