Fix for Firefox FS gallery bug