This is incorrect, there may not be a target labeled `0` to choose from.  This should be `targets = [context.targets[0]]`