Minor change for performance according to Andy's suggestion.