Fixed preferred size caching issue