fix some issues with filenames and json