NN_twovalues gets an assertion error