Replaced deprecated get_context_instance call to reflect 2.7 API change