Fix to RainDetection bugs