fix insert/update to client