Bugfix on file viewing