fix option parsing