Fix for weight (bug introduced by previous commit).