Fix hang on timeout