Fixing calculation of reweight