Jim Miller to fight Danny Castillo

Veteran UFC lightweight Jim Miller has agreed to a short-notice fight against Danny Castillo, scheduled for July 25 at United Center in Chicago.

UFC officials announced the new 155-pound matchup on Monday. Miller replaces Castillo's original opponent, Dagestan's Rustam Khabilov, who was knocked off the card because of visa issues.

Miller (24-6) and Castillo (17-8) badly need of a win, with each having lost two in a row. Miller, 31, lost his second consecutive start for the first time in his career in April, dropping a unanimous decision to Beneil Dariush. Before that loss, Miller suffered a knockout loss to Donald Cerrone in July 2014.

Castillo, 35, is coming off a highlight-reel knockout loss to Paul Felder at UFC 182 in January. The Sacramento, California-based lightweight is on a 1-3 skid in his past four fights, although two of the losses were very close decisions to Tony Ferguson and Edson Barboza.

A bantamweight title fight between defending champion TJ Dillashaw (11-2) and Renan Barao is scheduled to headline the UFC on Fox event. Dillashaw is Castillo's teammate on Team Alpha Male.