fixed bug in diffusion

variable n was used twice with different meanings