fixes to loading config file and a few other little things