reworked the config code, shouldn't be as prone to breakage now..