fixed bugs in gmix