fixed diffusion related bug