fixing logic problem with :test option being set to test mode when it should indicate test server