Update initialze_context
Fixes for sideeffects
No assertion errors anymore. Only failed tests.