fix database setting and etc