Fix for missing contexts in templates