fix bugs, upgrade api version