Replaced deprecated get_system_context calls to reflect 2.7 API change