Resolve deprecation warning