Finally fixed upgrading