Removed the if inside timeout