fix bug for update