Fix broken SSE gradient computation.