handle timeouts nicely