fixed bugs in mixture