fix some config related bugs