Fix string refcounting in context.c
Merge pull request #567 from xVin/Fix-refcounting-in-context

Fix string refcounting in context.c