fix res.cmd type in format string