Fix for infinite refresh