Fixed deprecated method