fixes optargs and config options