context must be cleaned up before compare