fixed last config not used bug