Updated checkweight function