small bug fix to weight