fixes to option parse