Fix undefined var in SetCurrentTermCommand.