bug fixing in dilution.c in general