Pretreatment of the substrate before coating