prevnt problems when offlien