fixed bug with only parsing the first option