Fixed deprecated method.