Add settimeouts to prevent timing out