Added button state updating