avoid saving 0 in weight/count inadvertently