Fix crash for refresh