changes to handle network problems