Various fixes in config handling