Fix bug where new components where added to the teacher dialog for every time you pressed the + button