Fix bug for nested values in update