Fixed bug where modal doesn't close after uploading a network