fixed database and config bug