fix parsing of upgrade funcs