fix the problem of BackGroundDetection