Fix caching key issues