Fixed subtle SSH-removal logic issues found testing