Fixes for large file support