Improved upgrade behaviour