fix corner case for button state #900