fix a crash on net sgd