Fix a bug unloading a context