Fixed deprecation warning.