minor fixes in prime_cache for use on production