Replace deprecated methods

Change-Id: If5dd8c5ad2765310f62f35f2d56264e4df541202