Fix ConcurrentModificationException when changing video mode