fix font caching logic