Replaced deprecated method calls