fixes the problem with the weight not updating when a tab is deleted