fixed weight bug