Get rid of depreacted method usage

Change-Id: I35feec7cbc986e047fa996c9d239cf5ad3ef1ebd