Fix multiple target patterns error on 1st run