debugged inject_core_element