Remove incorrectly set options and improved switch element parsing.