Make downloading styles more robust

Change-Id: I0dc4354cd04a054a33435ceb1d5af83543b2415d