Fixed a typo
Added support for handling timeouts