Fixed switches

fixes #637