Added checks fixed a logical error in the test server.