Fixed key caching problem