weight calculation fixes