Fixed deprecation message issue