Resolve deprecation warnings