Fix a small memory leak
Added some hack to get big files working on 32bit