Fixed cmd functionality.