Added logic to handle correctly setting selected state when selecting multiple themes