Fix bug in context serialization.
Merge branch 'devel'

* devel:
  Fix bug in context serialization.