fixing weight bug