To prevent the jam from spreading excessively, make sure to use a thick jam or preserve. Additionally, avoid overfilling the thumbprint indentation. About 1/2 teaspoon of jam per cookie is usually sufficient.