Fixed a bug that prevented original filename from being saved