Fixed old timeout code