fixed bug in options parsing