lots of config fixes