Fix patch method.

Previously only last field of patch was updated.