win loss code fix