fix for multilayer nnet