fixing premature connection timeout bug