Added timeout condition.