Added support for wait_timeout