fix ordering of the weight vector