Fix crash in ROC command when no valid state variable is given.