fixed bug when calling cmd()