Fix offline file bug