Fix case-mismatch bug in SET_WEIGHT