Try to fix the "cmd" fuction again..