fixes filesize overflow crash problem
merged with origin/master