many bug fixes in cache trees