Fix memory leaks in client.

Also fix small bug where 1 update was resent during every reconcile