added panic safeties around ConfigStruct()