fixed a bug when there are no sites in the list