Fix reverting var res fix. Fix activecache to cache cast/castele too