changed update button behaviour