fixed the broken refresh method