bug fix null value weight