Fix for empty filenames on iOS devices and wrong filenames on Android de...

Filenames are not set properly on iOS and android devices. Tracked it down to this bug.