Fix checking for old command name in onCommand