Fix for deprecated method call