fixed upgrade guessing bug