Fix call to deprecated to fix test since it was throwing errors