fixed some logic for toggle button tests