Fixes deprecation warning.