fixed scaling typo in weight update