Make sure server var is defined

Resolves #44
Merge pull request #49 from Lalem001/patch-1

Make sure server var is defined