Modified switch state, fixes done