Fix some problems with the rain detection.