DETROIT (AP) — Josh Allen threw a go-ahead, 5-yard touchdown pass to Stefon Diggs late in the first half and Buffalo beat the Cleveland Browns 31-23 after the NFL moved the Bills’ home game to Detroit due to several feet of snow blanketing western New York.

The Bills avoided blowing a third straight halftime lead by scoring on all five of their possessions in the second half and doing a better job protecting the ball.

Cleveland rallied within eight points, setting up an onside kick in the final seconds that Bills receiver Gabe Davis failed to grab and running back Taiwan Jones knocked out of bounds.