Proper handling of timeouts