fix a timeout bug