fixed the unseen errors in the switch