Moreover, in this case also by heat treating in an atmosphere of the nitrogen containing compound of the present invention, or nitrogen or an inert gas such as argon or helium, after formation of the terminals, an device having even better properties can be obtained.