Fix get_corrupted logic