fix bug with chance of rain func