Fix for Context loss when using shared context