Fixed. AddWindow bug where the id was not added to the main window after
adding new media.