Make sure server var is defined

Resolves #44