Scratch should only be fed as a treat since it doesn't have the nutrition they need for it to be fed as a staple and will cause problems as the sole diet, as you have seen. They like the taste of it better so they will eat it first over other feed if given the option, just like a child would eat only candy all day instead of vegetables if you let them. Offer only the layer feed (some will say you should feed an all flock to the rooster but I feed my roosters layer and have never have a problem but it is an option if you want) so that your birds don't have a choice about eating it and only give them scratch occasionally as a treat.