Bugfix for invalid filenames