fix option parsing bug