fix cmdopt