fix start up race condition for server