fixed timeout bug