fixed case where client would continue to run if started before server