Fixed deprecated method calls