updated with new switch fix