Kaput_nnCostFunction fixed