fix a bug in the weight. Implemented an hack to deal with the current samples