Fixed an issue with clearing the cache for types