selected should be called before updateImagesVisibility and restored
after it