remove context and resources from event and scope