fixed options parsing order