Fixed the undefined cmd error.