Fixed a few edge cases in which the file browser would become desynced.