Handle timeout more gracefully.