Fixed upgrade on build, better chaching