Fix completed migration detection.