Fixed remote cache and added test