Fixed minor but important error in bclib.pl, other changes