Fixes long resizing of files. This should be usable