Fixed deprecation error.