state bug fixes, converted from buttonclick events to textchanged events