Fixed #554
Fixed problems with cache and version detection