Fixed a bug with weights in two-level design