refresh func fix