command class cast fix