For comedy fans, ABC giveth and ABC taketh away. The network has ordered two more seasons of its centerpiece sitcom Modern Family, but also announced that it has canceled Tim Allen's Last Man Standing.

The two series were not among ABC's earlier pickups, for very different reasons. With Modern Family, contract renegotiations slowed things throughout the spring. Nevertheless, ABC was obviously not going to let its most popular (even with declining ratings) comedy go away.

ABC's announcement notes that the show could continue beyond the upcoming ninth and tenth seasons. It is likely that another round of intense negotiations would need to take place to keep its award-winning and high-profile cast, which includes Ed O'Neill, Sofia Vergara, Julie Bowen and Ty Burrell around past 2019.

What's renewed? What's canceled? Here's the 2016-2017 TV scorecard

During upfronts season, we have to take the good with the bad. Unfortunately, the bad news is hitting Last Man Standing fans the hardest. The Tim Allen vehicle aired for six seasons on ABC, the last five of which were on Friday nights, and concluded its run on March 31. There's no word on the future of Last Man Standing's Friday night slot mate Dr. Ken.

The move suggests that ABC may try something other than sitcoms on Friday nights next season.

ABC will announce its full fall schedule on Tuesday, May 16.