Fix bug in option parsing