Cleanup close detection.