Fixed call to deprecated method