After a two-game road stretch that included rough losses to the Minnesota Vikings and Los Angeles Rams, a home matchup with the lowly New England Patriots on Sunday proved to be exactly what the San Francisco 49ers needed to get moving in the right direction.