fix bug in misc_cmd