fixes possible file url bug