Fix for dynamically created contexts