A pharmaceutical or nutraceutical composition with a core, an inner coating layer, and an outercoating layer, wherein a pharmaceutical or a nutraceutical active ingredient is contained in the core, one or more salts of alginic acid is contained in the inner coating layer, and one or more water-insoluble polymers or copolymers is contained in the outer coating layer. In the composition, the ratio of the amount of the one or more salts of alginic acid in the inner coating layer is at least 2.5:1 by weight to the amount of the one or more water-insoluble polymers or copolymers in the outer coating layer.