bug fix to cmd option handling
merge