fix neural net cloning
fix tests for small derivatives