bug fix. Make indirect-nnls mode work