fixes to uiswitch and buttons