fix upgrade without stdin available