Fixed bugs in how SetWeak was used.