Fix parsing of options