Fixed upgrade to 0.5.9