fix tag weight bug and do some others