fix type caching issue