Fixed deprecated method calls.