Fix use of a deprecated function

Change-Id: I74db9180007de78f66f976004f4181284368416a