Show/hide element based on a variable's value
Bug fixes for toggle control