Corrected bug as directed by Jean-Yves Grandpeix. "nent" in "cv3_mixing" is an argument instead of a local variable.