Fix active and inactive challenge logic.