A digital printer and a method of controlling the digital printer having a print head with an array of printing elements and a failure detection system arranged to detect malfunctioning printing elements. When, during printing, a malfunctioning printing element is detected, a switch from the current print strategy to another print strategy is arranged during printing which leaves the number of passes per swatch constant, i.e. the print quality is not affected by the switch.