The fault must be from your margarine. This happens when it contains too much water, or perhaps you added excess water to the dough. Ensure your margarine has at least 70% fat.