Added safer timeout.