Bugfix

Corrected the definition of $server to occur earlier in the conditional.