fixed bugs in option argument parsing