Avoid using deprecated method

Change-Id: Id62f5299c723b2a70f80bd2c6a9251317aa61865