Changed deprecated method
Update, working for now