Fixing context serialization issues.