improved upgrade validation