Fix bug with sorting and domain name deployment