fixed a bug with weighting scheme choice