Added support for timeouts