Replaced call that triggers deprecated error