Added weight sum check