added some fixes to database classes(DbHelper and Contract)