Fixed upgrading issue