Fixed deprecation error