Fixed deprecation warning from InstanceMethods.

Change-Id: Idc3322444855284f081f118b0020e1e5a3ac2f24