Fixed the case when there are no virtual networks defined.