Fix issue where being offline wouldnt persist after page refresh