dirty hack to fix double file access problem