Fixed cmd to use function rather than alias