fix infinite loop for network shares