patch for AMG upgrading

patch for AMG upgrading, need use Rovi API ASAP.