fixes timeout bug