fix some issues with switch plan rules