Fixed arch detection on upgrade script.