Fixed issues with switching between servers