fixed failed_count