Diffusion workspace bug correction

Correct cast error that made half of the diffusion workspace non functional (cf forum)