fix crash when illegal option passed