Fixed error in new weight functions