Fixed problems with cache and version detection