fixed the database setting in model