Fixed preprocessing bug and fixed BW iteration with csalib searchsub_lf to work properly