Dirty fix the "cmd" fuction.