Fixes a deprecation warning.