Fixed upgrade code to not enable plugins on upgrade if they were disabled.