Fix code for loading, storing and accessing context information