Fixed: bug with renaming files

Actually existed longer than one commit ago. Tabs now refresh after renaming and all IDs are assigned correctly.