fixed the flashing erosion bug