Fixed deprecation warning