Dirk Nowitzki and rookie Dennis Smith Jr. each scored 20 points, and Dallas Mavericks stopped a three-game slide by beating the Orlando Magic 114-99 on Tuesday night.

Wesley Matthews had 16 points for Dallas, which got its first win since Dec. 31 against Oklahoma City. Harrison Barnes and Yogi Ferrell scored 15 points apiece, and J.J. Barea had 12 assists and eight points.

Mavericks coach Rick Carlisle earned his 708th career win, moving past John MacLeod for 17th in NBA history. Next up for Carlisle is Gene Shue, who has 784 wins.

Aaron Gordon scored 19 points for Orlando, which has lost five in a row. D.J. Augustin had 18 points, and Marreese Speights finished with 13 points and 10 rebounds.

Gordon did not start the game after head coach Frank Vogel said the power forward was late for the team plane.