Fix for deprecation warning