Fixed the switch bug. Switch now accurately displays the active state of
the task and retains its state when another task is deleted.