fix deprecated method call