Update equals() in Weight. Fix wrong comparison bug