Fixed nasty timeout bug