Fixed the bug around line 95 in prepare_base_and_mix...