You could be making these common mistakes.
Bad odour in clothes may not be due to detergent. Excess detergent, overloading the machine, wrong water temperature, ...