plan caching bug fix