minor cleanup and sanity weighting check