small fixes in nnet for pickling