I tried this a few months back and it worked,washing machine powder contains active ingredients which can go mouldy in your machine, the answer was to add some bleech into your machine and do a quick rinse(without clothes), this kills off the bacteria and stops your machine from smelling, also you might want to consider a little less powder if you have a build-up of sludge.
Good luck.
Andrew Greenaway
March 2011