Fix NPE in setclass command.