I think your code is fine because based on the short name there is only one of each. But if for some reason you have multiple class with the same short name, the code will just return the first one. Not sure if that is by design.
What if your set has more than one? Maybe,