Fix tests

Server was closed immediately after starting