Fixed appcache logic