fixed updates for squared loss