Changed looping of config