Addressing deprecation warnings