fix the bug on failuredetection