fixed a bug for update button