-added server sendState for each buttons
-added catch security exception for each buttons