Added revert for switch statements