Target to fix unsafe NHS hospitals slips but overall programme is on firmer footing, report finds