fix issue #3: cmdoptsgroup sometimes doesn't work