changed switch behavior for ios