Fixed improper reuse of the "upgrade_messages" variable when displaying upgrade messages