Fix bug disconnect database.