Fix timeout code stuff