fix bug for select upgrade pkgs