same fix for deprecation warning as previous commit