When did the 39 Ohm get burnt? Switching On or Off?
I would suspect it would burn out in the turn on peak V state because 0.01uF is several MOhm at 50 Hz but a transient pulse has broad spectral content, so we treat the Cap as a short circuit, thus you need to absorb many watts for a few ms only during the transient. Choose a 1W or 2W carbon resistor, not a metal or carbon film !!
The others can be 1/4W but must also be solid carbon and not carbon film to withstand surges.