correct invalid input for `upgrade