bugfix on weight extraction