Fix toggle button not showing correct toggle state in view-selector